Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  Pin  link  to  start  menu  

 Content of Pin link to start menu.vbs
MD5 Hash: CF0BD0EE1D03896D0657A6C79ED3DAEF
Dim ofso : Set ofso = CreateObject("Scripting.FileSystemObject")
Dim oShell : Set oShell = CreateObject("Shell.Application")
Dim sFile, sDir

If WScript.Arguments.Count > 0 then
If WScript.Arguments.Count > 1 then
For iCount = 0 to WScript.Arguments.Count -1
If iCount = WScript.Arguments.Count -1 then
sFile = sFile & WScript.Arguments(iCount)
Else
sFile = sFile & WScript.Arguments(iCount) & " "
End if
Next
Else
sFile = WScript.Arguments(0)
End if
End if

If ofso.FileExists(sFile) then
sDir = ofso.GetFile(sFile).ParentFolder
sFile = ofso.GetFile(sFile).Name
Dim oFolder : Set oFolder = oShell.Namespace(sDir)
Dim oFolderItem : Set oFolderItem = oFolder.ParseName(sFile)

Dim colVerbs : Set colVerbs = oFolderItem.Verbs

For Each oVerb in colVerbs

sVerb = LCase(Replace(oVerb.Name, Chr(38), "", 1, -1, 1))

Select Case sVerb
case "an startmenü anheften"
oVerb.DoIt()
WScript.Quit
case "pin to start menu"
oVerb.DoIt()
WScript.Quit
End Select
Next
End if

   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a